package com.hsc.www.exchangeType.direct2;

import com.hsc.www.User;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class UserReceiver {

    @RabbitListener(queues = Config.DOG1_QUEUE)
    public void receive1(User user) {
        System.out.println("接收：queueName=" + Config.DOG1_QUEUE + "   " + user.toString());
    }

    @RabbitListener(queues = Config.DOG2_QUEUE)
    public void receive2(User user) {
        System.out.println("接收：queueName=" + Config.DOG2_QUEUE + "   " + user.toString());
    }

    @RabbitListener(queues = Config.DOG3_QUEUE)
    public void receive3(User user) {
        System.out.println("接收：queueName=" + Config.DOG3_QUEUE + "   " + user.toString());
    }
}
